package com.study.sfd.prescription.feign;

import com.study.common.entity.DoctorEntity;
import com.study.common.entity.PatientEntity;
import com.study.common.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("person")
public interface PersonService
{
    @GetMapping("/person/druggist/ids/{doctorId}")
    Result<List<Integer>> getDruggistIdsByDoctorId(@PathVariable("doctorId") Integer doctorId);

    @GetMapping("/person/doctor/ids/{druggistId}")
    Result<List<Integer>> getDoctorIdsByDruggistId(@PathVariable("druggistId") Integer druggistId);

    @GetMapping("/person/patient/{id}")
    Result<PatientEntity> getPatient(@PathVariable("id") Integer id);

    @GetMapping("/person/doctor/{id}")
    Result<DoctorEntity> getDoctor(@PathVariable("id") Integer id);
}
